//
//  ZYTagSignView.m
//  yigou
//
//  Created by 秦乾龙 on 17/1/13.
//  Copyright © 2017年 hanyiwang. All rights reserved.
//

#import "ZYTagSignView.h"
#import "UIButton+WebCache.h"
#import "UIImageView+WebCache.h"
@implementation ZYTagSignView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (ZYTagSignView*)initWithBackgroundImg:(NSString*)imageStr
{
    self = [super init];
    CGFloat selfH = 164*kScale;
    _backImg = [[UIImageView alloc]init];
    [_backImg sd_setImageWithURL:[NSURL URLWithString:imageStr]];
    _backImg.frame = CGRectMake(0, 0, selfH, selfH);
    self.layer.masksToBounds = YES;
    self.layer.cornerRadius = 8*kScale;
    [self addSubview:_backImg];
    
    UIView *coverView = [[UIView alloc]init];
    coverView.backgroundColor = [UIColor blackColor];
    coverView.alpha = 0.1f;
    coverView.frame = CGRectMake(0, 0, selfH, selfH);
    [self addSubview: coverView];
    
    _addBtn = [ZYButton buttonWithType:UIButtonTypeCustom];
    _addBtn.frame = CGRectMake(0, 0, selfH, selfH);
    [self addSubview:_addBtn];
    
    _titleLable = [[UILabel alloc]init];
    _titleLable.frame = CGRectMake(0, selfH+30*kScale, selfH, 42*kScale);
    [self addSubview:_titleLable];
    return  self;
    
}
@end
